
#include <gomoku/AI/DefaultPlayer.h>
#include <gomoku/core/IReferee.h>

namespace gomoku
{

    DefaultPlayer::DefaultPlayer()
        : _referee(0), _color(BLACK), _type(HUMAN)
    {}

    DefaultPlayer::~DefaultPlayer()
    {}

    void DefaultPlayer::connectReferee(IReferee *referee)
    {
        _referee = referee;
    }

    // STATE game
    // Color -> Black or White
    Color DefaultPlayer::color() const {return _color;}

    void DefaultPlayer::setColor(Color color)
    {
        _color = color;
    }

    // Type -> Human or CPU
    PlayerType DefaultPlayer::type() const {return _type;}
    
    void DefaultPlayer::setType(PlayerType type)
    {
        _type = type;
    }

    // think is call only for CPU player
    // else gui->think call by referee
    Move DefaultPlayer::think()
    {
        Move move;

        move.color = _color;
        move.line = 0;
        move.column = 0;

        return move;
    }

    void updateGoban(Move const & move)
    {

    }

}
